package com.family.system.service.impl;

import com.family.pedigree.domain.FamilyTreeBrief;
import com.family.pedigree.mapper.FamilyTreeBriefMapper;
import com.family.system.service.IFamilyTreeBriefService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 家族简介描述表 服务实现类
 * </p>
 *
 * @author forever
 * @since 2025-01-03
 */
@Service
public class FamilyTreeBriefServiceImpl extends ServiceImpl<FamilyTreeBriefMapper, FamilyTreeBrief> implements IFamilyTreeBriefService {

    @Override
    public void add(FamilyTreeBrief brief) {
        save(brief.setCreateBy("admin").setUpdateBy("admin"));
    }

    @Override
    public void edit(FamilyTreeBrief brief) {
        updateById(brief.setUpdateBy("admin"));
    }

    @Override
    public void delById(Long id) {
        removeById(id);
    }

    @Override
    public List<?> getList(FamilyTreeBrief brief) {
        return list();
    }
}
